package com.ChainBizPro.system.service;

import com.ChainBizPro.system.model.domain.PurchaseOrders;
import com.ChainBizPro.system.model.domain.Suppliers;
import com.ChainBizPro.system.model.dto.Order.OrdersQueryRequest;
import com.ChainBizPro.system.model.dto.Order.PurchaseOrdersAddRequest;
import com.ChainBizPro.system.model.dto.Order.OrderPaymentQueryRequest;
import com.ChainBizPro.system.model.vo.PurchaseOrderVO;
import com.ChainBizPro.system.model.vo.PurchaseOrdersVO;
import com.ChainBizPro.system.model.vo.SuppliersVO;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;

/**
 * 订单服务
 *
 * @author liusijia
 */
public interface PurchaseOrdersService extends IService<PurchaseOrders> {

    Page<PurchaseOrders> getQueryWrapper(Page<PurchaseOrders> page, OrdersQueryRequest orderIdQueryRequest,
            long userId);

    PurchaseOrdersVO getPurchaseOrdersVO(PurchaseOrders purchaseOrders);

    Page<PurchaseOrderVO> getQueryWrapperByAdmin(Page<PurchaseOrderVO> pageParam,
            OrdersQueryRequest ordersQueryRequest);

    boolean addPurchaseOrders(PurchaseOrdersAddRequest purchaseOrdersAddRequest, HttpServletRequest request);

    Page<PurchaseOrderVO> getQueryWrapperByUser(Page<PurchaseOrderVO> pageParam, OrdersQueryRequest orderIdQueryRequest,
            Long userId);

    /**
     * 根据支付状态查询订单
     */
    Page<PurchaseOrderVO> getOrdersByPaymentStatus(Page<PurchaseOrderVO> pageParam,
            String paymentStatus, OrderPaymentQueryRequest queryRequest, Long userId);
}
